< previous page page_281 next page >

Page 281
If you set the Style to sbrSimple, then the StatusBar acts like a simple label control, whose single panel caption is controlled via the SimpleText property. However, more features are available when you create a multiple panel status bar.
Working with the Panels of the Status Bar
The real work of the status bar is handled by its panels. Each panel is a separate object with its own properties that control its appearance and behavior. Each panel is part of the status bar's Panels collection. After you draw the status bar on your form and set its basic properties, you can begin adding panels to the bar. You do so through the Property Pages of the status bar, shown in Figure 12.30.
0281-01.jpg
Figure 12.30
You can manage your status bar by
clicking the ellipsis button to the right of the
Custom properties in the Property window.
To set up an individual panel, use the Property Pages dialog box to set these eight main properties that control the appearance and behavior of the panel:
TextDetermines the text to be displayed in a text style panel. (Usually you set this property at runtime.)
ToolTipTextSets the text that is displayed when users rest the mouse pointer over the panel.
AlignmentDetermines whether the text in the panel is left-justified, right-justified, or centered in the panel.
StyleDetermines the type of panel created.
BevelSets the type of shadowing used for the 3D look of the panel.
AutoSizeDetermines how the size of the panel is handled by the program.
MinWidthSets the minimum size of the panel.
PictureDetermines what, if any, picture is displayed in the panel.
Although most of these properties are self-explanatory, the Style and AutoSize properties merit further attention.
You can create seven different styles of panels for your status bar. Although one of the styles (sbrText) is designed for you to display your own text, most of the other styles are predefined status items. These styles display the settings of the lock keys (such as Caps Lock, Num Lock, and so on) or the system date and time. These styles are handled by the control itself, so you

 
< previous page page_281 next page >